const mongoose = require('mongoose')

const Schema = mongoose.Schema

const userSchema = new Schema({
  username: {
      type: String,
      maxlength: 16,
      required: true,
      minlength: 3
  },
  password: {
      type: String,
      maxlength: 16,
      required: true,
      minlength: 6
  },
  salt: {
      type: String,
      required: true,
  }
}, {timestamps: true})

mongoose.model('User', userSchema, 'user')